<div class="tableform">
      <table cellspacing="0" cellpadding="0" border="0" class="gridlist">
        <tr>
          <td>发货单号</td>
          <td>物流单号</td>
        </tr>
    <{assign var="key" value="0"}>
      <{foreach from=$res item=his}>
    <{assign var="key" value=$key+1 }>
      <tbody>
        <tr>
          <td><{$his.deliverynote_bn}></td>
          <td><{$his.deliverynote_id}></td>
        </tr>
        </tbody>
      <{/foreach}>

        <tr>
          <td>总数：</td>
          <td><{$key}></td>
        </tr>

      </table>
</div>